<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Article Form</title>

<style>
.error {
	color: #ff0000;
	font-style: italic;
}
</style>

</head>
<body>
<p />
<p />
<h2 align="center">Custom Article Form</h2>
<!-- 01 version - form-tag -->
<form:form commandName="article" action="" method="post">
	<table align="center">
		<tr>
			<td>Name:</td>
			<td><form:input path="product.name" /></td>
			<td><form:errors path="product.name" cssClass="error" /></td>
		</tr>
		<tr>
			<td>Description:</td>
			<td><form:input path="product.description" /></td>
			<td><form:errors path="product.description" cssClass="error" /></td>
		</tr>
		<tr>
			<td>Quantity:</td>
			<td><form:input path="quantity" /></td>
			<td><form:errors path="quantity" cssClass="error" /></td>
		</tr>
		<tr>
			<td />
			<td><input type="submit" title="Save" /></td>
			<td></td>
		</tr>
	</table>

</form:form>

<!-- 02 version - spring-tag -->
<!-- 
<spring:nestedPath path="article">
	<form method="post" action="">
	<table>
		<tr>
			<td>Name:</td>
			<td><spring:bind path="product.name">
				<input type="text" name="${status.expression}"
					value="${status.value}" />
			</spring:bind></td>
		</tr>
		<tr>
			<td>Description:</td>
			<td><spring:bind path="product.description">
				<input type="text" name="${status.expression}"
					value="${status.value}" />
			</spring:bind></td>
		</tr>
		<tr>
			<td>Quantity:</td>
			<td><spring:bind path="quantity">
				<input type="text" name="${status.expression}"
					value="${status.value}" />
			</spring:bind></td>
		</tr>
		<tr>
			<td />
			<td><input type="submit" /></td>
		</tr>
	</table>
	</form>
</spring:nestedPath>
 -->
</body>
</html>
